source comm.cfg


ssh ${PRIMARY} "if [ ! -d '${INSTALLDIR}' ]; then mkdir -p '${INSTALLDIR}'; fi"
ssh ${STANDBY} "if [ ! -d '${INSTALLDIR}' ]; then mkdir -p '${INSTALLDIR}'; fi"

scp check_pg.sh comm.cfg ${PRIMARY}:${INSTALLDIR}
scp check_pg.sh comm.cfg ${STANDBY}:${INSTALLDIR}

nohup ssh ${PRIMARY} "cd ${INSTALLDIR} && bash -s" < install.sh > ${PRIMARY}-pg.log 2>&1 &
nohup ssh ${STANDBY} "cd ${INSTALLDIR} && bash -s" < install.sh > ${STANDBY}-pg.log 2>&1 &
